import actionType from '../actionType'
import {createAction} from 'redux-actions'
import * as common from '@apis/common'
import {createAjaxAction} from "@utils/common";

// 登录
export const requestLogin = createAction(actionType.REQUEST_LOGIN)
export const receiveLogin = createAction(actionType.RECEIVE_LOGIN)
export const login = createAjaxAction(common.login, requestLogin, receiveLogin)

// 表单验证
export const setFormCache = createAction(actionType.SET_FORM_CACHE)
export const clearFormCache = createAction(actionType.CLEAR_FORM_CACHE)
